package com.open.platform.oauth.controller;

import com.open.platform.oauth.entity.SysUser;
import com.open.platform.oauth.service.SysUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/user")
public class UserController {
    @Autowired
    private SysUserService sysUserService;

    @GetMapping("/getUser")
    public SysUser getUserById(Integer userId){
        try {
            SysUser sysUser = sysUserService.getById(userId);
            return   sysUser;
        }catch (Exception e){
            e.printStackTrace();
        }
     return  null;
    }
}
